<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <img src="images/course01.png" alt="">
    <script>
        const arr = [1,2,3,4,5,6,7]
        const img1 = document.querySelector('img')
        const ran = Math.floor(Math.random() * arr.length)
        img1.innerHTML = arr[ran]
        img1.src = `images/course0${arr[ran]}.png`
                         
        console.log(arr[ran]);


        
    </script>
</body>
</html>